package cn.bone.ou.vote.vo;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

public class VoteVo {

    @Data
    public static class ListVo{
        private Integer voteId;
        private String title;
        private String startTime;
        private String endTime;
        private Integer state;
        private String handCount;
    }

    @Data
    public static class DetailVo {
        private Integer voteId;
        private Integer voteRange;
        private String title;
        private String startTime;
        private String endTime;
        private String content;
        private Integer state;
        private List<ExtraVo> extras = new ArrayList<>();
        private List<ItemVo> items = new ArrayList<>();
    }

    @Data
    public static class ExtraVo{
        private Integer extraType;
        private Integer detailId;
        private String name;
        private String url;
        private Integer orderNum;
    }

    @Data
    public static class ItemVo{
        private String title;
        private Integer itemType;
        private Integer chooseNum;
        private Integer orderNum;
        private List<OptionVo> options = new ArrayList<>();
    }

    @Data
    public static class OptionVo{
        private String answerOption;
        private String answerContent;
    }

    @Data
    public static class ResultDetailVo{
        private String title;
        private List<ResultOptionVo> options = new ArrayList<>();
    }

    @Data
    public static class ResultOptionVo{
        private String answerOption;
        private String answerContent;
        private Integer count;
        private String percentage;
    }

    @Data
    public static class MemberDetailVo{
        private Integer userId;
        private String realName;
        private String phoneNum;
        private Integer gender;
        private String idCard;
        private String buildNum;
        private String unitNum;
        private String houseNum;
        private String createTime;
    }

    @Data
    public static class MemberVoteDetailVo{
        private String title;
        private List<MemberVoteDetailOptionVo> options = new ArrayList<>();
    }

    @Data
    public static class MemberVoteDetailOptionVo{
        private String answerOption;
        private String answerContent;
        private Integer hasChoose;
    }
}
